//
//  UserModel.h
//  WHSport
//
//  Created by ccjoy-jimneylee on 15/4/14.
//  Copyright (c) 2015年 jimneylee. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserEntity.h"
typedef void(^Successed) (BOOL successed, unsigned int value);
typedef void(^SuccessedInfoBlock)(id info);
@interface UserModel : NSObject

@property (nonatomic, copy)NSDictionary *datall;
@property (nonatomic, strong)UserEntity *currentUser;
@property (nonatomic, copy) NSString *loginame;
@property (nonatomic, copy) NSString *password;
@property (nonatomic, copy) NSString *idNum;
@property (nonatomic, copy) NSString *successPer;


+ (UserModel *)sharedInstance;

- (BOOL)isOnline;

- (void)loginWithLoginname:(NSString *)loginname
                 password:(NSString *)password
                successed:(Successed)successed;

- (void)registWithLoginname:(NSString *)loginname
                  password:(NSString *)password
              successBlock:(Successed)successBlock;

- (void)checkAccountIsExist:(NSString *)telephone
                successTele:(Successed)successTele;

- (void)getSmsCode:(NSString *)telephone
       successTeleNum:(Successed)successTeleNum;

- (void)checkSmsCode:(NSString *)telephone
             smscode:(NSString *)smscode
    successTeleNumber:(Successed)successTeleNumber;

- (void)personalModifyWithID:(NSString *)idNum
                         sex:(NSString *)sex
                     address:(NSString *)address
                        nick:(NSString *)nick
                      perMod:(Successed)perMod;

- (void)personalModifyWithPassword:(NSString *)password
                                ID:(NSString *)Id
                            perPas:(Successed)perPasl;

- (void)personalUpImgWithID:(NSString *)Id
                   filename:(NSString *)filename
                    imgdata:(NSData *)imgdata
                      perUp:(Successed)perUp;

- (void)findPasswordWithPhone:(NSString *)phone
                     password:(NSString *)password
                  successFind:(Successed)successFind;

- (void)GetMyEvaWithAccountId:(NSString *)accountid
                         page:(NSString *)page
                        MyEva:(SuccessedInfoBlock)MyEva;

- (void)warJoinGetWithAccount:(NSString *)account
                   warGet:(SuccessedInfoBlock)warGet;

- (void)warSendGetWithAccount:(NSString *)account
                       warGet:(SuccessedInfoBlock)warGet;

- (void)myfriendListWithID:(NSString *)inNum
                  myfriend:(SuccessedInfoBlock)myfriend;

- (void)myfriendDeleteWithID:(NSString *)idNum
                      Delete:(Successed)Delete;

- (void)sendCommtWithAccount:(NSString *)idNum
                    sportsID:(NSString *)sportID
                        cont:(NSString *)cont
                       level:(NSString *)level
                     getSend:(Successed)getSend;

- (void)changeOrderWithID:(NSString *)idNum
                   status:(NSString *)status
                  success:(Successed)success;

- (void)paymoneyWithMoney:(NSString *)money
                 ordernum:(NSString *)ordernum
                  subject:(NSString *)subject
                     body:(NSString *)body
               paysuccess:(SuccessedInfoBlock)paysuccess;

- (void)getWarDetailWithWarid:(NSString *)warNum
                       userid:(NSString *)userid
                      getData:(SuccessedInfoBlock)getData;

- (void)addFriendWithmeID:(NSString *)meID
                  otherID:(NSString *)otherID
               returnData:(Successed)returnData;

- (void)applyWarWithMeid:(NSString *)Meid
                   warID:(NSString *)warID
                 appData:(Successed)appData;

- (void)mywarPersonWithwid:(NSString *)wid
                    myData:(SuccessedInfoBlock)myData;

- (void)sendWarWithaccountId:(NSString *)accountId
                sportEventId:(NSString *)sportEventId
                sportsHallId:(NSString *)sportsHallId
                   timeLimit:(NSString *)timeLimit
                       count:(NSString *)count
                       level:(NSString *)level
                      remark:(NSString *)remark
                    fileName:(NSString *)fileName
                  yuezhanpic:(NSData *)yuezhanpic
                     warData:(Successed)warData;

- (void)setApplrWithwarID:(NSString *)warID
                applyid:(NSString *)applyid
                   status:(NSString *)status
                getStatus:(Successed)getStatus;



@end
